package com.selftool;

import com.selftool.gui.superframe.SuperFrame;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.WebApplicationType;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.builder.SpringApplicationBuilder;
import org.springframework.context.ApplicationContext;

/**
 * selfTool入口
 * Edit by CYQ 2024年2月28日 更改启动方式为springboot启动
 */

@MapperScan("com.selftool.mapper")
@SpringBootApplication
public class Main {
    public static ApplicationContext context;
    public static void main(String[] args) {
        SpringApplicationBuilder builder = new SpringApplicationBuilder(Main.class);
        //设置headless=false，设置web为none
        context = builder.headless(false).web(WebApplicationType.NONE).run(args);
        //获取对象然后正常执行
        SuperFrame frame = context.getBean(SuperFrame.class);
        frame.create();
    }
}
